A programming technique is disclosed for linking (or “mapping”) a query expression on the tree structure of an extensible markup language (XML) based computer-coded data to the “start” and “end” positions of the corresponding XML-coded data contained when the coded data has variable length, in order to enhance the efficiency of querying an XML document (or other type of data based on tree structure).
The technique is applicable to XML-coded data that does not contain “redundant whitespaces” (i.e., no new character(s) between XML “tags” and otherwise limiting non-character entries to the minimum number necessary for the XML expression to be well-formed) or otherwise utilizes appropriate correction factors to account for “whitespaces”.
Previous techniques of querying an XML-coded file (involving use of programs such as XQuery and XPath) require the entire XML data file to be examined (or “read”) in order to perform a search for the desired data, resulting in more “file read” operations and potentially causing “memory overload” for the storage locations containing XML data files. In contrast, use of the present invention does not require all XML-coded data residing in a file to be loaded into memory for performance of the query search, thus providing memory use efficiency (and advantages over conventional methods).